package smodel;

/**
 * The model interface will give us a convenient way to talk
 * about a "Master" model and a "Node" model. In this case,
 * state is an object that encapsulates everything to 
 * capture the model's state.  
 * 
 * In the context of our shared model, the state will be
 * the AGE's for our DNA viewing thing, or a Document
 * for the shared text area.
 * 
 * @author Kristopher L. Kalish, James Madison University
 * @version 1 - April 11, 2008
 *
 * @param <T>
 */
public interface Model<T extends NamedModel>
{
	/**
	 * Warning!
	 * Calling this state is very misleading, and I simply need to come up with a better name.
	 * Since a copy is not returned, when the state changes, the references will appear to 
	 * change too.  This is not a problem for my implementation, but the semantics don't 
	 * match what's going on.
	 * 
	 * @return
	 */
	public T getState();
	public void setState(T state);
	/**
	 * TODO:
	 * Make an abstract model which implements some observer pattern guys.
	 * 
	 * then make NodeField listen to stateChanged, so it can call
	 * setDocument()
	 * and
	 * revalidate()
	 * on itself.
	 */
}

